<template>
	<view>
		<!-- <view class="">{{obj.name}}</view>
		<view class="">{{obj.age}}</view>
		<view class="">
			{{obj.tel}}
		</view>
		
		<view class="">{{arr1[0]}}</view>
		<view class="">{{arr1[1]}}</view>
		<image :src="obj.touxiang" mode=""></image>
		<image :src="arr2[0]" mode=""></image> -->
		
		
		<!-- <view class="">{{arr1[0]}}</view>
		<view class="">{{arr1[1]}}</view>
		<view class="">{{arr1[2]}}</view>
		<view class="">{{arr1[3]}}</view> -->
		
		<!-- <view  v-for="el in arr1">{{el}}</view> -->
		
		
		<!-- <view  v-for="el in arr1">
			<view>66666</view>
			<view>{{el}}</view>
		</view> -->
		
		
		
		<!-- <view>{{arr4[0].name}}</view>
		<view>{{arr4[1].name}}</view>
		<view>{{arr4[2].name}}</view>
		<view>{{arr4[3].name}}</view> -->
		
		<!-- <view v-for="el in arr4">{{el.name}}</view> -->
		
		
		<!-- <view v-for="el in arr5">
			<view>{{el.name}}</view>
			<view>{{el.age}}</view>
			<view>{{el.img}}</view>
			<image :src="el.img"></image>
		</view> -->
		
		<view v-if="age<18">年龄:{{age}},未成年,不可以喝酒</view>
		<view v-else-if="age>23">年龄:{{age}},已经成年,可以结婚</view>
		<view v-else>年龄:{{age}},已经成年,可以喝酒</view>
		
		<!-- <view v-else-if="age<18">年龄:{{age}},未成年,不可以喝酒</view> -->
		<!-- <view v-if="age>=18">年龄:{{age}},已经成年,可以喝酒</view> -->
		
		
		<view v-for="el in arr">
			<view v-if="el.flag">
				<text>{{el.touxiang}}</text>---<text>{{el.text}}</text>
			</view>
			<view v-else>
				<text>{{el.text}}</text>---<text>{{el.touxiang}}</text>
			</view>
		</view>
		
	</view>
</template>
<script setup>
	let arr=[{flag:true,touxiang:"1.png",text:"123123"},
	{flag:false,touxiang:"2.png",text:"666"}
	]
	
	
   let age=24
   




	let obj={name:"karen",age:23,tel:18282832,touxiang:"https://img0.baidu.com/it/u=256816879,771155532&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1709398800&t=a3fed43cad9ccd0164f3641ba31c5409"}
	// console.log(obj.name,obj.tel,age)
	let arr1=["js","css","html","nodejs"]
	console.log(arr1[0])
	let arr2=["https://img0.baidu.com/it/u=256816879,771155532&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1709398800&t=a3fed43cad9ccd0164f3641ba31c5409"]
	
	
	// let obj1={
	// 	title:"前端开发",
	// 	its:[
	// 		{
	// 			id:123,
	// 			name:"CSS"
	// 		},
	// 		{
	// 			id:123,
	// 			name:"HTML"
	// 		},
	// 		{
	// 			id:123,
	// 			name:"JS"
	// 		},
	// 		{
	// 			id:123,
	// 			name:"TS"
	// 		}
	// 	]
	// }
	// console.log(obj1.its[2].name)
	
	let arr3=[{
			title:"前端开发",
			its:[
				{
					id:123,
					name:"CSS"
				},
				{
					id:123,
					name:"HTML"
				},
				{
					id:123,
					name:"JS"
				},
				{
					id:123,
					name:"TS"
				}
			]
		},
		{
			title:"AI开发",
			its:[
				{
					id:123,
					name:"python"
				},
				{
					id:123,
					name:"opencv"
				}
			]
		}
	]
	
	console.log(arr3[1].title)
	console.log(arr3[1].its[0].name)
	
	
	
	let arr4=[{name:"karen",age:20},
	{name:"jack",age:16},
	{name:"marry",age:28},
	{name:"joe",age:21}
	]
	
	let arr5=[{name:"karen",age:20,img:"https://img0.baidu.com/it/u=771583120,1915458320&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1709658000&t=d8c16a26908428c362c3d0837d8c0752"},
	{name:"jack",age:16,img:"https://img0.baidu.com/it/u=1216218962,818428868&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1709658000&t=9b973375999f29ebd9d196feb6938bb1"},
	{name:"marry",age:28,img:"https://img0.baidu.com/it/u=1616264935,2346301632&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1709658000&t=d3ae49c1ccef9f3f31eb2d277cfee06c"},
	{name:"joe",age:21,img:"https://img0.baidu.com/it/u=4184464217,3511937759&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1709658000&t=46268412e9d87cbc98ab572c883dcb3c"}
	]
</script>
<style>
	
</style>